package com.woniumall.util;

import java.util.Collection;

/**
 * @auther linke
 * @create 2021-11-06 12:53
 */
public class UtilValidate {
   /** Check whether string s is NOT empty. */
    public static boolean isNotEmpty(String s) {
        return (s != null) && s.length() > 0;
    }

    /** Check whether collection c is NOT empty. */
    public static <E> boolean isNotEmpty(Collection<E> c) {
        return (c != null) && !c.isEmpty();
    }
    /** Check whether collection c is NOT empty. */
    public static <E> boolean isEmpty(String c) {
        return (c == null) && c.isEmpty();
    }
    /** Check whether charsequence c is NOT empty. */
    public static <E> boolean isNotEmpty(CharSequence c) {
        return ((c != null) && (c.length() > 0));
    }
}
